#!/bin/bash

VERSION=0.1
OUTNAME=libuconn-$VERSION
OUTFILE=./archive/$OUTNAME.tar.bz2

# assuming we're in prj/tools/scripts
cd ../..

# we need the archive directory
if [ ! -d "./archive" ]; then
  mkdir "./archive"
fi

# remove old version of this file
if [ -f "$OUTFILE" ]; then
  rm "$OUTFILE"
fi

# do archive now
git archive --prefix=$OUTNAME/ --format=tar master | bzip2>$OUTFILE
